import request from '@/utils/request'
// 获取区域列表
export const regApi = (params) => {
  return request({
    url: '/api/vm-service/region/search',
    params
  })
}

// 新增区域
export const addReg = (data) => {
  return request({
    url: '/api/vm-service/region',
    method: 'POST',
    data
  })
}

// 修改区域
export const changeRegApi = (data) => {
  return request({
    url: `/api/vm-service/region/${data.id}`,
    method: 'PUT',
    data
  })
}

// 删除区域
export const delRegApi = (data) => {
  return request({
    url: `/api/vm-service/region/${data.id}`,
    method: 'DELETE',
    data
  })
}

// 获取区域详情
export const lookRegApi = (params) => {
  return request({
    url: '/api/vm-service/node/search',
    params
  })
}

// 新增点位
export const addNodeApi = (data) => {
  return request({
    url: '/api/vm-service/node',
    method: 'POST',
    data
  })
}

// 点位详情
export const nodeDetail = (id) => {
  return request({
    url: `/api/vm-service/node/vmList/${id}`
  })
}

// 删除点位
export const delnood = (data) => {
  return request({
    url: `/api/vm-service/node/${data.id}`,
    method: 'DELETE',
    data
  })
}

// 修改点位
export const editNood = (data) => {
  return request({
    url: `/api/vm-service/node/${data.id}`,
    method: 'PUT',
    data
  })
}

// 合作商名称
export const partnerList = (params) => {
  return request({
    url: '/api/user-service/partner/search',
    params
  })
}
